<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "dh_order".
 *
 * @property integer $id
 * @property string $orderId
 * @property integer $uid
 *   @property integer $img_id
 * @property string $name
 * @property string $address
 * @property string $tel
 * @property integer $sum
 * @property string $express
 * @property integer $flag
 * @property integer $create_time
 */
class DhOrder extends \common\components\ActiveRecord2015
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dh_order';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'flag', 'create_time','img_id'], 'integer'],
            [['sum'],'number'],
            [['orderId', 'name', 'tel', 'express'], 'string', 'max' => 30],
            [['address'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'orderId' => 'Order ID',
            'uid' => 'Uid',
            'name' => 'Name',
            'address' => 'Address',
            'tel' => 'Tel',
            'sum' => 'Sum',
            'express' => 'Express',
            'flag' => 'Flag',
            'create_time' => 'Create Time',
        ];
    }
}
